import * as request from "@/utils/request.js";

export function treeselect() {
    return request.get("/system/menu/treeselect");
}

export function roleMenuTreeselect(roldId){
    return request.get(`/system/menu/roleMenuTreeselect/${roldId}`);
}

export function getMenuList(params){
    return request.get(`/system/menu/list`,params);
}

export function saveMenu(data){
    return request.postJson(`/system/menu`,data);
}

export function updateMenu(data){
    return request.putJson(`/system/menu`,data);
}

export function getMenuDetail(menuId){
    return request.get(`/system/menu/${menuId}`);
}

export function deleteMenu(menuId){
    return request.default({
        url:`/system/menu/${menuId}`,
        method:"delete"
    });
}

